//package comc.springbatch;
//
//import org.springframework.batch.core.Job;
//import org.springframework.batch.core.Step;
//import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
//import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
//import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.annotation.EnableScheduling;
//
//@Configuration
//@EnableBatchProcessing
//@EnableScheduling
//public class BatchTest4 {
//    @Autowired
//    public JobBuilderFactory jobBuilderFactory;
//    @Autowired
//    public StepBuilderFactory stepBuilderFactory;
//    @Autowired
//    public DbWriter dbWriter;
//    @Autowired
//    public MyProcess myProcess;
//    @Autowired
//    public DbReader myReader2;
//
//    @Bean
//    public Job job4(){
//        return jobBuilderFactory.get("job5044")
//                .start(step4()).listener(new MyJobListener()).build();
//    }
//    @Bean
//    public Step step4() {
//        return stepBuilderFactory.get("step304").
//                chunk(2)
//                .faultTolerant()
//                .listener(new MyChunkListiener())
//                .reader(myReader2.myReader2())
//                .processor(myProcess)
//                .writer(dbWriter)
//                .build();
//    }
//
//}
